<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp" %>
<div id="SaveOrUpdateDevWin"
	style="width: 600px; height: 310px; padding: 10px;overflow-y: auto;"
	class="easyui-dialog" title="查询录入操作"
	data-options="modal:true,closed:true,minimizable:false,collapsible:false,maximizable:false,iconCls:'icon-save',onClose:function(){$('#saveOrUpdateDevForm')[0].reset();} ">
	<form id="saveOrUpdateDevForm" method="post" enctype="multipart/form-data" >
		<div class="menu_form_body">
		
		  <table  border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
				  <th align="right" height="26">身份证明号码：</th>
					<td align="right" width="200" height="40"
						class="tangchukuangliebiao1">
						<input id="sfzmhmSel" style="width: 100%;" type="text" class="shurukuangkais" placeholder="请输入号码"  />
					</td>
					<td align="right" width="150" class="tangchukuangliebiao1">
						<a href="###" class="congzhim" id="shenqingcx"  style="margin: 0 5px 2px 0;">查询</a>
					</td>
				</tr>
			</table>
			<table border="0" cellpadding="0" cellspacing="0" width="100%" class="cheliangxinxi">
			   <tr>
	         	 <th align="right" height="26" width="100">姓名：</th>
	             <td>
	                 <span class="indexstylelist" id="xm"></span>
	             </td>
	             <th align="right" height="26" width="100">性别：</th>
	             <td>
	             		<span class="indexstylelist" id="xb"></span>
	             </td>
	         </tr>
	     	 <tr>
	         	 <th align="right" height="26">身份证号：</th>
	             <td>
	                 <span class="indexstylelist" id="sfzmhm"></span>
	             </td>
	             <th align="right" height="26">发证机关：</th>
                 <td>
                     <span class="indexstylelist" id="fzjg"></span>
                 </td>
	         </tr>
	         <tr>
	         	 <th align="right" height="26">档案编号：</th>
	             <td>
	                 <span class="indexstylelist" id="dabh"></span>
	             </td>
	             <th align="right" height="26"></th>
	            <td>
                     <span class="indexstylelist"></span>
                 </td>
	         </tr>

			</table>
			<div class="shenqinganniudss" id="dd" style="display:none;">
				<a href="javascript:addTabFunc();" class="sousuocx"  style="padding: 1px 10px; margin: 0 4px 0 0;">进入编辑</a>
			</div>
		</div>
	</form>
</div>
		<input type="hidden" id="driverXh"/>
		<input type="hidden" id="driverSfzmhm"/>>
<script type="text/javascript">

function addTabFunc(){
	var sfzmhm=$('#sfzmhmSel').val();
	parent.addTab("驾驶证档案录入", "${ctx}/yxxx/DriverYxcjBysfzmhm.htm?sfzmhm="+sfzmhm);
}
function applyForAuth(){
	$('#SaveOrUpdateDevWin').window('open');
	clearInfo();
	$('#dd').hide();
	//$('#dd').show();
}
	//清空申请页面信息(机动车)
	function clearInfo(){
		 $('#xm').val('');
		 $('#xb').val('');
		 $('#sfzmhm').text('');
		 $('#fzjg').text('');
	}
   $(function(){   
	   $('#shenqingcx').unbind('click').bind('click',function(){
		   clearInfo();
		   var sfzmhm=$.trim($('#sfzmhmSel').val());	
		   if(sfzmhm!='' ){
		       $.ajax({
		           type:'post',
		           url:'${ctx}/yxxx/queryDriver.htm',
		           data:{
		               sfzmhm:sfzmhm
		           },
		           dataType:'json',
		           success:function(data){
		               if(null!=data && data!=''){
		            	   if(data.zzz=='1'){
		            		   alert("此档案已存在，请勿重复录入！");
		            	   }else{
		            	   $('#dd').show();                     
	                       //页面表单
	                         $('#xm').text(data.xm);
	                       if(data.xb=='1'){
							 $('#xb').text('男');
	                       }else{
	                    	   $('#xb').text('女'); 
	                       }
							 $('#sfzmhm').text(data.sfzmhm);
							 $('#fzjg').text(data.fzjg);
							 $('#dabh').text(data.dabh);
		            	 }
		               }else{
		            	   $('#dd').hide();
		            	   alert('该驾驶证不存在，请重新输入');
		               }
		           }
		       });
		   }else{
			   alert('号码不能为空!');
		   }
		});
   });
</script>